<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ page import="com.lczyfz.istep.common.constants.LearnProgress" %>
<c:set var="unStart" value="<%= LearnProgress.unStart %>"/>
<c:set var="oneQuarter" value="<%= LearnProgress.oneQuarter %>"/>
<c:set var="half" value="<%= LearnProgress.half %>"/>
<c:set var="threeQuarter" value="<%= LearnProgress.threeQuarter %>"/>
<c:set var="finish" value="<%= LearnProgress.finish %>"/>

<html>
<head>
	<title>课件学习情况</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/teach/teachDistribute/">教学管理列表</a></li>
		<%--<li><a href="${ctx}/resource/resourceCourse/viewCourseList?courseSystemId=${param.courseSystemId}">查看课程</a></li>--%>
		<li class="active"><a href="#">课件学习情况</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="resourceCourseware" action="${ctx}/resource/resourceCourseware/viewCourseLearnList?courseId=${param.courseId}" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>课件名称：</label>
				<input type="text" id="coursewareName" name="coursewareName" value="${resourceCourseware.coursewareName}" htmlEscape="false" class="input-medium"/>
			</li>
			<li><label>学生名称：</label>
				<input type="text" id="name" name="name" value="${resourceCourseware.name}" htmlEscape="false" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="btns">&nbsp;&nbsp;<input id="search" class="btn btn-primary" type="button" value="重置" /></li>
			<%--<li  class="btns">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id="btnCancel" class="btn btn-primary" type="button" value="返回" onclick="history.go(-1)"/></li>--%>
			<li  class="btns">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-primary" href="${ctx}/resource/resourceCourse/viewCourseList?courseSystemId=${param.courseSystemId}">返回</a>
			<% String courseSystemId = request.getParameter("courseSystemId"); %>
			<input id="courseSystemId" name="courseSystemId" value="<%=courseSystemId%>" type="hidden">
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>课件名称</th>
				<th>学生名称</th>
				<th>学习进度</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="resourceCourseware">
			<tr>
				<td>
					${resourceCourseware.coursewareName}
				</td>
				<td>
					${resourceCourseware.name}
				</td>

				<c:if test="${resourceCourseware.learnProgress==unStart}">
					<td>未开始</td>
				</c:if>
				<c:if test="${resourceCourseware.learnProgress==oneQuarter}">
					<td>25%</td>
				</c:if>
				<c:if test="${resourceCourseware.learnProgress==half}">
					<td>50%</td>
				</c:if>
				<c:if test="${resourceCourseware.learnProgress==threeQuarter}">
					<td>75%</td>
				</c:if>
				<c:if test="${resourceCourseware.learnProgress==finish}">
					<td>已学习</td>
				</c:if>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	<script>
		<%--重置--%>
		var test=document.getElementById("search");
		test.onclick=function(){
			var coursewareName=document.getElementById("coursewareName");
			var name=document.getElementById("name");
			coursewareName.value = null;
			name.value = null;
		};
	</script>
</body>
</html>